require "tree"

class NeuralNet

	attr_reader :inp_neurons, :out_neurons

	def initialize( inp_neurons )

		@inp_neurons = inp_neurons
		find_out_neurons
	end

	def add_inp_neuron( neuron ) 
		@inp_neurons << neuron
		self.find_out_neurons
	end

	# Find all of the output neurons
	def find_out_neurons
		out_neurons = @inp_neurons.map {|n| n.leaves}
		@out_neurons = @out_neurons & (out_neurons.uniq)
	end

end
